using System;
using System.Collections.Generic;
using System.Text;
using MinimizeEngine.Managers;
using Microsoft.Xna.Framework;
using MinimizeEngine.Menu_System;
using Microsoft.Xna.Framework.Graphics;

namespace MinimizeEngineDemo.Screens
{
    class PauseMenuScreen : MEMenuScreen
    {
        /// <summary>
        /// Constructor.
        /// </summary>
        public PauseMenuScreen()
            : base("Paused", true)
        {
            // Flag that there is no need for the game to transition
            // off when the pause menu is on top of it.
            IsPopup = true;

            // Create our menu entries.
            MEMenuEntry resumeGameMenuEntry = new MEMenuEntry("Resume Game");
            MEMenuEntry quitGameMenuEntry = new MEMenuEntry("Quit Game");

            // Hook up menu event handlers.
            resumeGameMenuEntry.Selected += OnMenuScreenCanceled;

            // Add entries to the menu.
            MenuEntries.Add(resumeGameMenuEntry);
            MenuEntries.Add(quitGameMenuEntry);
        }

        /// <summary>
        /// Draws the pause menu screen. This darkens down the gameplay screen
        /// that is underneath us, and then chains to the base MenuScreen.Draw.
        /// </summary>
        public override void Draw(GameTime gameTime)
        {
            MEScreenManager.FadeBackBufferToColour(Color.Black, TransitionAlpha * 2 / 3);

            base.Draw(gameTime);
        }
    }
}
